﻿<%@ Page Title="" Language="C#" MasterPageFile="../MasterPages/MedianamikModule.master" AutoEventWireup="true" CodeBehind="TypeSearchResults.aspx.cs" Inherits="Medianamik.UI.Web.TypeManagement.TypeSearchResults" %>

<asp:Content ID="Content3" ContentPlaceHolderID="CenterContent" runat="server">
    <p>
        <asp:Literal ID="Literal2" runat="server" Text="<%$Resources: Medianamik_ContentManagement, SearchResult_YourSearchQuery %>"></asp:Literal> <strong><%= Query %></strong>
	</p>
	<telerik:RadGrid ID="SearchResults" 
	                 runat="server"
	                 AutoGenerateColumns="false"
	                 Skin="Medianamik"
	                 EnableEmbeddedSkins="false"
	                 OnNeedDataSource="GridNeedDataSource"
	                 AllowPaging="true"
	                 PagerStyle-Mode="NextPrevAndNumeric"
	                 AllowCustomPaging="true"
	                 PageSize="50"
	                 OnItemDataBound="SearchResultsItemDataBound"
	                 OnItemCommand="SearchResultsItemCommand">
	    <MasterTableView>
	        <Columns>
	            <telerik:GridTemplateColumn>
				    <HeaderTemplate><asp:Literal ID="Literal1" runat="server" Text="<%$ Resources: Medianamik_TypeManagement, TypeNameColumn %>"></asp:Literal></HeaderTemplate>
					<ItemTemplate>
					    <med:NodeTypeIcon ID="NodeTypeIcon1" runat="server" NodeTypeId='<%# Eval("ID") %>' />
					    <p>
					        <asp:Literal ID="lnkTypeName" runat="server" />
					        <asp:Literal runat="server" Text='<%# " (" + (Container.DataItem as Medianamik.Core.NodeType).GetNodeCount() + ", " + (Container.DataItem as Medianamik.Core.NodeType).GetTotalNodeCount() + ")"   %>' Visible='<%# (Container.DataItem as Medianamik.Core.NodeType).GetTotalNodeCount() > 0 %>'></asp:Literal>
					    </p>
					</ItemTemplate>
				</telerik:GridTemplateColumn>
				<telerik:GridTemplateColumn HeaderStyle-Width="1%" HeaderText="Actions">
					<HeaderStyle HorizontalAlign="Center" />
					<ItemStyle CssClass="Actions" />
					<ItemTemplate>
						<table border="0" cellpadding="0" cellspacing="0" align="center">
							<tr>
								<td><med:EditLink runat="server" ID="btnEdit" title="Modifier le type" /></td>
								<td><asp:HyperLink ID="lnkPropertyList" runat="server" title="Modifier les propriétés du type"><img src="../images/Icones/Ico_Page.gif" width="16" height="16" /></asp:HyperLink></td>
								<td><asp:HyperLink ID="lnkSecurity" runat="server" title="Sécurité du type"><img src="/medianamik/images/Icones/Ico_SecuriteElement.png" width="16" height="16" /></asp:HyperLink></td>
								<td><med:ConfirmedDeleteButton ID="btnDeleteType" OnCommand="SearchResultsItemCommand" CommandArgument='<%# Eval("ID") %>' CommandName="DeleteType" runat="server" ToolTip="<%$ Resources: Medianamik_Global, Action_DeleteTooltip %>" ConfirmText="<%$ Resources: Medianamik_ContentManagement, ConfirmDeleTypeText %>" /></td>
								<td><med:ConfirmedImageButton  runat="server" ID="btnGenTable" OnCommand="lnkGenTable_Click" CommandArgument='<%# Eval("ID")%>' ConfirmText='<%$ Resources: Medianamik_TypeManagement, ConfirmGenerateTableText %>' ImageUrl='/Medianamik/Images/Icones/Ico_Rafraichir.gif'></med:ConfirmedImageButton></td>
							</tr>
						</table>
					</ItemTemplate>
				</telerik:GridTemplateColumn>
		    </Columns>
	    </MasterTableView>
	    <ClientSettings EnableRowHoverStyle="true"></ClientSettings>
	</telerik:RadGrid>
</asp:Content>